package com.huoyun.car.bean;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class CarOperatingLicense {
	private Integer id;
	private String licenseNumber;
	private String businessOwner;
	private String address;
	private Date effectiveStartDate;
	private Date effectiveEndDate;
	
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}

	public String getLicenseNumber() {
		return licenseNumber;
	}
	public void setLicenseNumber(String licenseNumber) {
		this.licenseNumber = licenseNumber;
	}
	public String getBusinessOwner() {
		return businessOwner;
	}
	public void setBusinessOwner(String businessOwner) {
		this.businessOwner = businessOwner;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public Date getEffectiveStartDate() {
		return effectiveStartDate;
	}
	public void setEffectiveStartDate(Date effectiveStartDate) {
		this.effectiveStartDate = effectiveStartDate;
	}
	public Date getEffectiveEndDate() {
		return effectiveEndDate;
	}
	public void setEffectiveEndDate(Date effectiveEndDate) {
		this.effectiveEndDate = effectiveEndDate;
	}
	public String getEffectiveStartDateStr() {
		return new java.text.SimpleDateFormat("yyyy-MM-dd").format(effectiveStartDate);
	}
	public void setEffectiveStartDateStr(String effectiveStartDateStr) {
		DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
		try {
			this.effectiveStartDate = format.parse(effectiveStartDateStr);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	public String getEffectiveEndDateStr() {
		return new java.text.SimpleDateFormat("yyyy-MM-dd").format(effectiveEndDate);
	}
	public void setEffectiveEndDateStr(String effectiveEndDateStr) {
		DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
		try {
			this.effectiveEndDate = format.parse(effectiveEndDateStr);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
		
}
